Skip to content

Conversation

@mcous
Copy link
Collaborator

@mcous mcous commented Nov 12, 2025

This PR replaces our $state wrapper around the passed in props with a custom $state.raw + Proxy solution to create a "shallow state" around props

This shallow state allows rerender to continue to function while avoiding the weirdness of implicitly turning everything inside props into a Proxy, which is not how Svelte operates at runtime.

Long term, we should probably remove rerender and any internal reactive state entirely. If a user needs to rerender, they can pass their own $state in themselves. Happily, this new implementation already supports that, so I can explore a deprecation notice and update to the docs in a follow-up

Fixes #455

@mcous mcous marked this pull request as ready for review November 12, 2025 17:23
@mcous mcous force-pushed the fix/no-deep-proxy-props branch from 0c1a4bb to 054c3e1 Compare November 12, 2025 17:33
@mcous mcous merged commit 734e290 into main Nov 12, 2025
37 checks passed
@github-actions
Copy link

🎉 This PR is included in version 5.2.9 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: props passed into Svelte component should not be converted to $state, causes problems

2 participants